import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p011 from './p011';
import p019 from './p019';
export default async function a005(fd: IFeidaoAiBrowserComponent, e: Event) {
	// todo依据得到的“企业编号”取<工厂>表，得到“工厂编号”、“工厂名称”，并将“工厂名称”渲染在下拉框内。
	const d = e.currentTarget as HTMLSelectElement;
	const company_no = d.value.split(",")[1];
	if (company_no) {
		const res = await nodejs('device-management/zj-000001/s007', {
			filter: {
				company_no
			}
		});
		render(fd, res, p011, 'p011', 'inner');
		render(fd, res, p019, 'p019', 'inner');
	}
}
